package com.fifth.common.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 订单信息
 * </p>
 *
 * @author 第五组
 * @since 2022-09-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("o_order")
@ApiModel(value = "Order对象", description = "订单信息")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单表主键")
    @TableId(type = IdType.AUTO)
    private String id;

    @ApiModelProperty("用户id（哪个用户买的")
    private String uid;

    @ApiModelProperty("订单时间")
    private LocalDateTime orderdate;

    @ApiModelProperty("商品单价")
    private BigDecimal price;

    @ApiModelProperty("订单编号")
    private String code;

    @ApiModelProperty("状态  0 交易成功  1 待支付 2支付失败")
    private Integer state;

    @ApiModelProperty("商家id")
    private String bid;

    @ApiModelProperty("是否 发货  0 未发货  1 已发货")
    private Integer send;

    @ApiModelProperty("是否评论 0未评论 1评论")
    private Integer commentstatus;

    @ApiModelProperty("商品id")
    private String goodsid;

    @ApiModelProperty("下单数量")
    private Integer num;

    @ApiModelProperty("总价")
    private BigDecimal totalmoney;

    @ApiModelProperty("发货地址id")
    private String addrid;

    @ApiModelProperty("支付方式")
    private Integer paysort;

    @TableField(exist = false)
    @ApiModelProperty(hidden = true)
    private Goods goods;

    @TableField(exist = false)
    @ApiModelProperty(hidden = true)
    private BusinessInfo businessInfo;

    @TableField(exist = false)
    @ApiModelProperty(hidden = true)
    private List<Goods> goodsList;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String time;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer lastTime = 0;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String codeUrl;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String addr;


    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String gname;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String sname;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String unitname;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private List<Order> order;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String img;





}
